package com.jiao.jdkLogger;

import java.util.logging.ConsoleHandler;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.Logger;

public class JDKLoggerDemo {
    public static Logger logger = Logger.getLogger(JDKLoggerDemo.class.toString());
    static{
        // 日志处理程序
        Handler consoleHandler = new ConsoleHandler();
        consoleHandler.setLevel(Level.SEVERE);
        logger.addHandler(consoleHandler);
    }


    public static void main(String [] args){
        // 级别 all finest finer fine config info warning  server off
        // 设置日志级别
        logger.setLevel(Level.INFO);
        logger.finest("finest log...");
        logger.info("info log'''");
    }
}
